﻿using AutoMapper;
using ProductionManagement.Domain.Dtos;
using ProductionManagement.Domain.Dtos.Dispathch;
using ProductionManagement.Domain.Dtos.PreProductionDtos;
using ProductionManagement.Domain.Dtos.ProductionPlanDtos;
using ProductionManagement.Domain.Dtos.SendWorkersForQualityInspectionDTOS;
using ProductionManagement.Domain.ProductionDomain;
using ShowDispathchDTO = ProductionManagement.Domain.Dtos.Dispathch.ShowDispathchDTO;

namespace ProductionManagement.Dto
{
    public class AreaProFiles:Profile
    {
        public AreaProFiles()
        {
            CreateMap<Material, MaterialAddDto>().ReverseMap();
            CreateMap<Material, Material>().ReverseMap();
            CreateMap<Material, MaterialShowDto>().ReverseMap();
            CreateMap<Material, MaterialBlikDto>().ReverseMap();
            CreateMap<Material, MaterialUpdDto>().ReverseMap();

            //补料添加
            CreateMap<Feeding, AddFeeding>().ReverseMap();

            #region 预生产计划
            //添加预生产
            CreateMap<PreProduction, AddPreProductionDto>().ReverseMap();
            //修改预生产
            CreateMap<PreProduction, FanPreProductionDto>().ReverseMap();
            #endregion
            #region 生产计划
            //添加生产计划
            CreateMap<ProductionPlan, AddProductionPlanDto>().ReverseMap();
            CreateMap<ProductionPlan, UpdProductionPlanDto>().ReverseMap();
            #endregion

            //生产领料添加
            CreateMap<Picking, AddPickingDTO>().ReverseMap();
            //生产领料修改
            CreateMap<Picking,UptPickDTO>().ReverseMap();

            //生产退料添加
            CreateMap<Stripping, AddStrippingProductDto>().ReverseMap();

            //生产派工添加
            CreateMap<Dispatch, AddDispathchDTO>().ReverseMap();

            //生产派工显示
            CreateMap<Dispatch, ShowDispathchDTO>().ReverseMap();
            //生产订单添加
            CreateMap<ProduceOrders, AddProductOrderDTO>().ReverseMap();
            CreateMap<ProduceOrders, UptOrderDTO>().ReverseMap(); 

            //派工质检
            CreateMap<SendWorkersForQualityInspection, SendWorkersForQualityInspectionCreateDtos>().ReverseMap();
            CreateMap<SendWorkersForQualityInspection, SendWorkersForQualityInspectionUpdateDtos>().ReverseMap();


            //生产废料添加
            CreateMap<ProductionWaste, AddProductionWasteDto>().ReverseMap();



        }
    }
}
